#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
int main()
{
	int a = 0;
	int x = 0;
	int i = 0;
	int middle = 0;
	int sum = 0;
	scanf("%d", &a);
	for (i = 0; i < 5; i++)
	{
		middle = a * pow(10, i);
		sum += middle;
		x += sum;
	}
	printf("%d\n", x);
	return 0;
}
